Fix #4288 vschema errors should not bring down vtgate#4371
Merged
sougou merged 2 commits intovitessio:masterfrom Nov 19, 2018
Merged
Fix #4288 vschema errors should not bring down vtgate#4371sougou merged 2 commits intovitessio:masterfrom
sougou merged 2 commits intovitessio:masterfrom
Conversation
Save errors per keyspace in vschema instead of failing on the first error so that keyspaces with valid vschema don't get invalidated by a keyspace with vschema errors Signed-off-by: deepthi <deepthi@planetscale.com>
sougou
reviewed
Nov 17, 2018
Contributor
sougou
left a comment
There was a problem hiding this comment.
Nice work. Couple of nits.
| Sharded: ks.Keyspace.Sharded, | ||
| Tables: ks.Tables, | ||
| Vindexes: ks.Vindexes, | ||
| Error: func(ks *KeyspaceSchema) string { |
Contributor
There was a problem hiding this comment.
I think this is ok here, but should be used with care because inline functions incur additional overhead.
go/vt/vtgate/vindexes/vschema.go
Outdated
| if err != nil { | ||
| return fmt.Errorf("could not decode the keyspace id for pin: %v", err) | ||
| ksvschema.Error = fmt.Errorf("could not decode the keyspace id for pin: %v", err) | ||
| goto end |
Contributor
There was a problem hiding this comment.
Instead of this, you can tag the outer loop like this:
outer:
for ksname...
and then you can continue outer.
Signed-off-by: deepthi <deepthi@planetscale.com>
sougou
approved these changes
Nov 19, 2018
dweitzman
added a commit
to dweitzman/vitess
that referenced
this pull request
Mar 22, 2019
…er sequences PR vitessio#4371 made vtgate more permissive about allowing bad data in a vschema without failing requests that only involve properly-configured tables. This PR extends that so a single table entry in the vschema that references a bad sequence won't disable the sequences for all the other tables with valid sequence configs. Signed-off-by: David Weitzman <dweitzman@pinterest.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Save errors per keyspace in vschema instead of failing on the first
error so that keyspaces with valid vschema don't get invalidated by a
keyspace with vschema errors
Signed-off-by: deepthi deepthi@planetscale.com